/**
 * Copyright (C), 2015-2019, 山东桔灯行信息科技有限公司
 * FileName: SystemCode
 * Author:   chen
 * Date:     19-5-27 上午9:18
 * Description: 系统code
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.duochuang.verifycard.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * 〈一句话功能简述〉<br> 
 * 〈系统code〉
 *
 * @author chen
 * @create 19-5-27
 * @since 1.0.0
 */
@Entity
@Data
@Table(name = "t_system_code")
@EntityListeners(value = AuditingEntityListener.class)
public class SystemCode {
    @Id
    // code
    private String code;
    // 值
    private String value;
    // 备注
    private String remark;
    // 状态
    private Boolean status;
    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @LastModifiedDate
    @JsonFormat(timezone = "GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    public SystemCode(String code, String value, String remark) {
        this.code = code;
        this.value = value;
        this.remark = remark;
        this.status = true;
    }

    public SystemCode() {
    }
}
